<p>This directive can replace, merge or remove HTTP request
headers. The header is modified just before the content handler
is run, allowing incoming headers to be modified. The action it
performs is determined by the first argument. This can be one
of the following values:</p>
<dl>
<dt><code>set</code></dt>
<dd>The request header is set, replacing any previous header
with this name</dd>
<dt><code>append</code></dt>
<dd>The request header is appended to any existing header of the
same name. When a new value is merged onto an existing header
it is separated from the existing header with a comma. This
is the HTTP standard way of giving a header multiple
values.</dd>
<dt><code>add</code></dt>
<dd>The request header is added to the existing set of headers,
even if this header already exists. This can result in two
(or more) headers having the same name. This can lead to
unforeseen consequences, and in general <code>append</code> should be
used instead.</dd>
<dt><code>unset</code></dt>
<dd>The request header of this name is removed, if it exists. If
there are multiple headers of the same name, all will be removed.
<var>value</var> must be omitted.</dd>
</dl>
<p>This argument is followed by a header name, which can
include the final colon, but it is not required. Case is
ignored. For <code>add</code>, <code>append</code> and
<code>set</code> a <var>value</var> is given as the third argument. If
<var>value</var> contains spaces, it should be surrounded by double
quotes. For unset, no <var>value</var> should be given.
<var>value</var> may be a character string, a string containing format
specifiers or a combination of both. The supported format specifiers
are the same as for the <code class="directive"><a href="#header">Header</a></code>,
please have a look there for details.</p>
<p>The <code class="directive">RequestHeader</code> directive may be followed by
an additional argument, which may be used to specify conditions under
which the action will be taken, or may be the keyword <code>early</code>
to specify <a href="#early">early processing</a>. If the
<a href="../env.html">environment
variable</a> specified in the <code>env=<var>...</var></code> argument
exists (or if the environment variable does not exist and
<code>env=!<var>...</var></code> is specified) then the action specified
by the <code class="directive">RequestHeader</code> directive will take effect.
Otherwise, the directive will have no effect on the request.</p>
<p>Except in <a href="#early">early</a> mode, the
<code class="directive">RequestHeader</code> directive is processed
just before the request is run by its handler in the fixup phase.
This should allow headers generated by the browser, or by Apache
input filters to be overridden or modified.</p>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="../en/mod/mod_headers.html" title="English"> en </a> |
<a href="../ja/mod/mod_headers.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
<a href="../ko/mod/mod_headers.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
</div><div id="footer">
<p class="apache">Copyright 1995-2006 The Apache Software Foundation or its licensors, as applicable.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>